package com.blog.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.blog.entity.BlogType;
import com.blog.mapper.BlogTypeMapper;
import com.blog.service.BlogTypeService;

@Service
@Transactional
public class BlogTypeServiceImpl implements BlogTypeService {
	//注入blogTypeMapper
	@Autowired
	private BlogTypeMapper blogTypeMapper;
	/**
	 * 查询博客类型
	 */
	@Override
	public List<BlogType> blogTypeList() {
		
		return blogTypeMapper.findAllBlogType();
	}
	/**
	 * 添加博客类型
	 */
	@Override
	public void addBlogType(BlogType blogType) {
		blogTypeMapper.addBlogType(blogType);
		
	}
	/**
	 * 删除博客类型
	 */
	@Override
	public void deleteBlogType(Integer typeId) {
		blogTypeMapper.deleteBlogType(typeId);
		
	}
	
}
